Payment Integrations
PayU Payments-
Sinch India APIs provide pre-built integrations with PayU Payment Gateway. To support it, a separate Payload attributes need to be provided in the metadata object. The details for the same is mentioned below:
Online Method of Payment
S.No | Field | Required | Description |
---|---|---|---|
1 | subAmount | Yes | This parameter must contain the payment amount. The value must be greater than 1. |
2 | description | Yes | This parameter must contain the description or purpose of creating the payment link. |
3 | source | Yes | Default value- API. |
4 | customer.phone | No | This field contains the customer name for whom the payment link is created. |
5 | customer.email | No | This field contains the customer email to which the created payment link is sent. |
6 | udf | No | This parameter can contain upto five user-defined fields, which merchant can pass any value of his/her relevance. |
Payload
{
"recipient_type": "individual",
"to": "91XXXXXXXXX",
"type": "template",
"template": {
"name": "pay_media_dynamic",
"language": {
"policy": "deterministic",
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://tinypng.com/images/social/website.jpg"
}
}
]
},
{
"type": "button",
"index": "0",
"sub_type": "url",
"parameters": [
{
"type": "text",
"text": "PayNow"
}
]
}
]
},
"metadata": {
"media": {
"mimeType": "image/jpeg"
},
"payuPay": {
"task": "API",
"data": {
"isAmountFilledByCustomer": false,
"subAmount": "1",
"description": "Car Insurance Premium",
"source": "API"
},
"longUrl": "www.aclsinch.com/pid123"
}
}
}
UPI Method of Payment
S.No | Field | Required | Description |
---|---|---|---|
1 | transactionId | Yes | This must contain the merchant transaction identifier. |
2 | transaction Amount | Yes | This must contain the amount for which QR needs to be generated. This must be greater than or equal to 1.00. |
Payload
{
"recipient_type": "individual",
"to": "91XXXXXXXXX",
"type": "template",
"template": {
"name": "payu_upi_img",
"language": {
"policy": "deterministic",
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://tinypng.com/images/social/website.jpg"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Sunny"
}
]
},
{
"type": "button",
"index": "0",
"sub_type": "url",
"parameters": [
{
"type": "text",
"text": "PayNow"
}
]
}
]
},
"metadata": {
"media": {
"mimeType": "image/jpeg"
},
"payuUPI": {
"task": "API",
"data": {
"transactionId": "22bjh8977102105",
"transactionAmount": "2"
},
"longUrl": "www.aclsinch.com/pid123"
}
}
}